/* t3new.do '/home/chansen/work/migration/stata' CBH 10/29/01 */
/* Uses distance to Pristina instead of to Kosovo */

log using "DIRECTORY HERE/t3new.log" ,replace

set memory 100m
set more off

cd "DIRECTORY HERE"

use rsa8399n.dta

sort country

drop _merge

merge country using pristina

set matsize 100



/* Generate instruments using distance from Pristina */
gen nowarpr1=nowar*Sardis1/1000
gen nbospr1=nwbosnia*Sardis1/1000
gen nkospr1=nwkosovo*prdis1/1000

gen nowarpr2=nowar*Sardis2/1000
gen nbospr2=nwbosnia*Sardis2/1000
gen nkospr2=nwkosovo*prdis2/1000


/* Regression without share of non-nationals from EU */

/* Men */

/* All men, with and without country trends. */

reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch dold if (dman==1 & is==0), robust
reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch dold if (dman==1 & is==0), robust


/* Young men, with and without country trends. */

reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch if (dman==1 & is==0 & dold == 0), robust
reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch if (dman==1 & is==0 & dold == 0), robust


/* Older men, with and without country trends. */

reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch if (dman==1 & is==0 & dold == 1), robust
reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch if (dman==1 & is==0 & dold == 1), robust


/* Women */

/* All women, with and without country trends. */

reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch dold if (dman==0 & is==0), robust
reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch dold if (dman==0 & is==0), robust


/* Young women, with and without country trends. */

reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch if (dman==0 & is==0 & dold == 0), robust
reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch if (dman==0 & is==0 & dold == 0), robust


/* Older women, with and without country trends. */

reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch if (dman==0 & is==0 & dold == 1), robust
reg lne_p lnf_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch if (dman==0 & is==0 & dold == 1), robust


/* Regression with share of non-nationals from EU */

/* Men */

/* All men, with and without country trends. */

reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch dold if (dman==1 & is==0), robust
reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch dold if (dman==1 & is==0), robust


/* Young men, with and without country trends. */

reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch if (dman==1 & is==0 & dold == 0), robust
reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch if (dman==1 & is==0 & dold == 0), robust


/* Older men, with and without country trends. */

reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch if (dman==1 & is==0 & dold == 1), robust
reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch if (dman==1 & is==0 & dold == 1), robust


/* Women */

/* All women, with and without country trends. */

reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch dold if (dman==0 & is==0), robust
reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch dold if (dman==0 & is==0), robust


/* Young women, with and without country trends. */

reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch if (dman==0 & is==0 & dold == 0), robust
reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch if (dman==0 & is==0 & dold == 0), robust


/* Older women, with and without country trends. */

reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch if (dman==0 & is==0 & dold == 1), robust
reg lne_p lnf_lf1 lneu_lf1 d84 d85 d86 d87 d88 d89 d90 d91 d92 d93 d94 d95 d96 d97 d98 d99 be dk de91 de_91 gr es fr ie it lu nl at pt fi se uk no is ch trendbe trendk trende91 trend_91 trendgr trendes trendfr trendie trendit trendlu trendnl trendat trendpt trendfi trendse trenduk trendno trendis trendch if (dman==0 & is==0 & dold == 1), robust

